package com.vv.tools.modules.sys.model;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.vv.tools.common.support.BasePage;
import com.vv.tools.common.validator.AddGroup;
import com.vv.tools.common.validator.UpdateGroup;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import io.swagger.v3.oas.annotations.media.Schema;

@Getter
@Setter
@ToString
@Schema(name = "Role")
public class RoleDTO extends BasePage implements Serializable {

    /**
     * 主键ID
     */
    @Schema(title = "ID")
    @NotNull(message = "id不能为空", groups = {UpdateGroup.class})
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 角色名字
     */
    @Schema(title = "角色名字")
    @Size(min = 2, max = 50, message = "用户名长度限制2~50", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    /**
     * 备注
     */
    @Schema(title = "备注")
    @Size(min = 2, max = 32, message = "备注长度限制2~32", groups = {AddGroup.class, UpdateGroup.class})
    private String remark;


    @Schema(title = "菜单")
    private List<String> menus;

}
